package cn.xiaopengstack.domain.activity.service.quota;

import cn.xiaopengstack.domain.activity.model.entity.RaffleActivityAccountEntity;
import cn.xiaopengstack.domain.activity.model.entity.RaffleActivityCountEntity;
import cn.xiaopengstack.domain.activity.model.entity.RaffleActivityEntity;
import cn.xiaopengstack.domain.activity.model.entity.RaffleActivitySkuEntity;
import cn.xiaopengstack.domain.activity.repository.IRaffleActivityRepository;
import cn.xiaopengstack.domain.activity.service.quota.policy.IRechargePolicy;
import cn.xiaopengstack.domain.activity.service.quota.rule.factory.DefaultActivityActionChainFactory;

import java.util.Map;

/**
 * @author jiangyangang
 * 活动数据支撑类
 */
public class RaffleActivityQuotaSupport {

    protected IRaffleActivityRepository activityRepository;

    protected DefaultActivityActionChainFactory defaultActivityActionChainFactory;

    public RaffleActivityQuotaSupport(IRaffleActivityRepository activityRepository, DefaultActivityActionChainFactory defaultActivityActionChainFactory) {
        this.activityRepository = activityRepository;
        this.defaultActivityActionChainFactory = defaultActivityActionChainFactory;
    }

    /**
     * 查询抽奖活动信息
     * @param activityId
     * @return
     */
    RaffleActivityEntity queryRaffleActivityByActivityId(Long activityId){
        return activityRepository.queryRaffleActivityByActivityId(activityId);
    }

    /**
     * 查询抽奖活动sku
     * @param activitySkuId
     * @return
     */
    RaffleActivitySkuEntity queryActivitySku(Long activitySkuId){
        return activityRepository.queryActivitySku(activitySkuId);
    };

    /**
     * 查询活动次数配置
     * @param countId
     * @return
     */
    RaffleActivityCountEntity queryRaffleActivityCountByActivityCountId(Long countId){
        return activityRepository.queryRaffleActivityCountByActivityCountId(countId);
    }

    /**
     * 活动账户
     * @param activity
     * @param userId
     * @return
     */
    RaffleActivityAccountEntity queryActivityAccount(Long activity, String userId){
        return activityRepository.queryActivityAccount(activity, userId);
    }
}
